package com.fivetiger.controller;

import com.fivetiger.entity.Contract;
import com.fivetiger.entity.Order;
import com.fivetiger.service.impl.ContractServiceImpl;
import com.fivetiger.service.impl.OrderServiceImpl;
import com.fivetiger.vo.PageBean;
import com.fivetiger.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/api/order/")
public class OrderController {
    @Autowired
    private OrderServiceImpl service;
    @RequestMapping("save.do")
    @ResponseBody
    public R save(Order order){
        return service.save(order);
    }

    @RequestMapping("all.do")
    @ResponseBody
    public PageBean select(){
        return service.query();
    }
}
